package com.letoy.study.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@Api(value = "测试接口", tags = "测试接口API")
public class WebController {

    @ApiImplicitParam(value = "", name = "Authorization", paramType = "header", dataType = "String", required = true)
    @RequestMapping(value = "/main", method = RequestMethod.POST)
    private HashMap<String, Object> getMain() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("status", "success");
        return map;
    }

    @ApiOperation(value = "测试2", notes = "测试a2pi")
    @RequestMapping(value = "/main2", method = RequestMethod.POST)
    private HashMap<String, Object> getMain2() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("status", "接口二测试成功");
        return map;
    }

    @ApiOperation(value = "测试3", notes = "测试3 api")
    @RequestMapping(value = "/main3", method = RequestMethod.POST)
    private HashMap<String, Object> getMain3() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("status", "接口三测试成功");
        return map;
    }
}
